@using SiteServer.CMS.Pages
<!DOCTYPE html>
<html style="overflow: hidden;">

<head>
  <meta charset="utf-8">
  <title>SiteServer CMS - 管理后台</title>
  <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
  <meta name="renderer" content="webkit" />
  <meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
  <link href="assets/bootstrap/css/bootstrap.min.css" rel="stylesheet" type="text/css" />
  <link href="assets/css/components.css" rel="stylesheet" type="text/css" />
  <link href="assets/css/pages.css" rel="stylesheet" type="text/css" />
  <link href="assets/css/menu.css" rel="stylesheet" type="text/css" />
  <link href="assets/css/ionicons.min.css" rel="stylesheet" type="text/css" />
  <link href="assets/css/font-awesome-4.7.0.min.css" rel="stylesheet" type="text/css" />
</head>

<body class="fixed-left widescreen" style="background-color: #eee">
  <div id="wrapper">
    <template v-if="pageLoad">
      <header id="topnav">
        <div class="topbar-main">
          <div class="logo">
            <a href="https://www.siteserver.cn" target="_blank" class="logo">
              <img src="assets/icons/logo.png" />
            </a>
          </div>
          <a v-if="!isDesktop" href="javascript:;" class="position-fixed" v-on:click="btnMobileMenuClick" style="right: 20px;top: 10px;">
            <i :class="{'ion-navicon': !isMobileMenu, 'ion-android-close': isMobileMenu}" style="font-size: 28px;color: #fff;"></i>
          </a>
          <ul v-if="isDesktop" id="topMenus" class="navigation-menu">
            <li v-for="topMenu in topMenus" class="has-submenu">
              <a :href="getHref(topMenu)" v-on:click="btnTopMenuClick(topMenu)" :target="getTarget(topMenu)" v-html="topMenu.text"></a>
              <ul v-if="topMenu.hasChildren" class="submenu">
                <li v-for="parentMenu in topMenu.children" :class="{'has-submenu': parentMenu.children}">
                  <a :href="getHref(parentMenu)" v-on:click="btnTopMenuClick(parentMenu)" :target="getTarget(parentMenu)" v-html="parentMenu.text"></a>
                  <ul v-if="parentMenu.hasChildren" class="submenu">
                    <li v-for="childMenu in parentMenu.children">
                      <a :href="getHref(childMenu)" v-on:click="btnTopMenuClick(childMenu)" :target="getTarget(childMenu)" v-html="childMenu.text"></a>
                    </li>
                  </ul>
                </li>
              </ul>
            </li>
          </ul>
          <div v-if="isDesktop" class="menu-extras">
            <ul class="navigation-menu nav navbar-nav navbar-right float-right">
              <li v-if="newVersion" class="has-submenu dropdown">
                <a href="javascript:;">
                  <i class="ion-email-unread text-warning"></i>
                </a>
                <div class="submenu card bg-light text-dark" style="width: 19rem; z-index: 11; position: absolute;">
                  <div class="card-body" style="padding-bottom: 0;">
                    <h5 class="card-title text-success">发现 SiteServer CMS 新版本</h5>
                    <p class="card-text"> 当前版本：{{ productVersion }} <br /> 最新版本： {{ newVersion.version }} <br /> 发布日期：
                      {{ newVersion.published }} <br />
                      <hr /> {{ newVersion.releaseNotes }} <br />
                      <a class="text-primary" :href="newVersion.updatesUrl" target="_blank">查看发行说明</a>
                      <hr />
                      <div class="text-center">
                        <button href="javascript:;" onclick="location.href = 'pageUpdateSystem.aspx'" class="btn btn-warning btn-block">立即升级</button>
                      </div>
                    </p>
                  </div>
                </div>
              </li>
              <li v-if="$siteId > 0" class="dropdown">
                <a href="javascript:;" onclick="openPageCreateStatus()">
                  <i class="ion-wand"></i>
                  <span v-if="pendingCount > 0" class="badge badge-xs badge-warning" style="right: 0;">{{pendingCount}}</span>
                </a>
              </li>
              <li class="list-inline-item dropdown notification-list has-submenu">
                <a class="nav-link nav-user" href="javascript:;">
                  <img style="height: 36px;width: 36px;" :src="local.avatarUrl ? local.avatarUrl : 'assets/images/default_avatar.png'"
                    class="rounded-circle">
                </a>
                <ul class="submenu">
                  <li><a :href="'settings/adminView.cshtml?pageType=user&userId=' + local.userId" target="right">{{local.level}}：{{local.userName}}</a></li>
                  <li><a :href="'settings/adminProfile.cshtml?pageType=user&userId=' + local.userId" target="right">修改资料</a></li>
                  <li><a :href="'settings/adminPassword.cshtml?pageType=user&userId=' + local.userId" target="right">更改密码</a></li>
                  <li><a href="pageLogout.cshtml">退出系统</a></li>
                </ul>
              </li>
              <li>
                <form v-if="$siteId > 0" id="search" class="navbar-left app-search float-left" :action="'cms/pageContentSearch.aspx?siteId=' + $siteId"
                  target="right" method="get">
                  <input name="siteId" type="hidden" :value="$siteId">
                  <input name="keyword" type="text" placeholder="内容搜索..." class="form-control">
                  <a href="javascript:;" onclick="$('#search').submit();">
                    <i class="ion-search"></i>
                  </a>
                </form>
              </li>
            </ul>
          </div>
          <div class="clearfix"></div>
        </div>
      </header>
      <div v-if="isDesktop || isMobileMenu" class="left side-menu" :style="{width: leftMenuWidth}">
        <div id="sidebar" class="sidebar-inner">
          <div id="sidebar-menu">
            <ul>
              <li v-if="siteMenus.length > 0" class="text-muted menu-title">站点管理</li>
              <li v-for="siteMenu in siteMenus" class="has_sub">
                <a :href="getHref(siteMenu)" v-on:click="btnLeftMenuClick(siteMenu)" :target="getTarget(siteMenu)" :class="{'subdrop': siteMenu === activeParentMenu}">
                  <i :class="(siteMenu.iconClass ? siteMenu.iconClass : 'ion-star')"></i>
                  <span v-html="siteMenu.text"></span>
                  <span v-if="siteMenu.hasChildren" class="menu-arrow"></span>
                </a>
                <ul v-if="siteMenu.hasChildren" class="list-unstyled" v-show="siteMenu === activeParentMenu">
                  <li v-for="childMenu in siteMenu.children" :class="{'active': childMenu === activeChildMenu}">
                    <a :href="getHref(childMenu)" :target="getTarget(childMenu)" v-on:click="btnLeftMenuClick(childMenu)">
                      <i :class="childMenu.iconClass"></i> <span v-html="childMenu.text"></span> </a>
                  </li>
                </ul>
              </li>
              <li v-if="pluginMenus.length > 0" class="text-muted menu-title"> 站点插件 <a v-if="updatePackages > 0" href="plugins/manage.cshtml?pageType=4" class="badge badge-warning" target="right">{{updatePackages}}</a>
              </li>
              <li v-for="pluginMenu in pluginMenus" class="has_sub">
                <a :href="getHref(pluginMenu)" v-on:click="btnLeftMenuClick(pluginMenu)" :target="getTarget(pluginMenu)"
                  :class="{'subdrop': pluginMenu === activeParentMenu}">
                  <i :class="(pluginMenu.iconClass ? pluginMenu.iconClass : 'ion-star')"></i>
                  <span v-html="pluginMenu.text"></span>
                  <span v-if="pluginMenu.hasChildren" class="menu-arrow"></span>
                </a>
                <ul v-if="pluginMenu.hasChildren" class="list-unstyled" v-show="pluginMenu === activeParentMenu">
                  <li v-for="childMenu in pluginMenu.children" :class="{'active': childMenu === activeChildMenu}">
                    <a :href="getHref(childMenu)" :target="getTarget(childMenu)" v-on:click="btnLeftMenuClick(childMenu)">
                      <i :class="childMenu.iconClass"></i> <span v-html="childMenu.text"></span> </a>
                  </li>
                </ul>
              </li>
              <template v-if="!isDesktop && isMobileMenu" v-for="topMenu in topMenus">
                <li class="text-muted menu-title" v-html="topMenu.text"></li>
                <li v-for="parentMenu in topMenu.children" class="has_sub">
                  <a :href="getHref(parentMenu)" v-on:click="btnLeftMenuClick(parentMenu)" :target="getTarget(parentMenu)"
                    :class="{'subdrop': parentMenu === activeParentMenu}">
                    <i :class="(parentMenu.iconClass ? parentMenu.iconClass : 'ion-star')"></i>
                    <span v-html="parentMenu.text"></span>
                    <span v-if="parentMenu.hasChildren" class="menu-arrow"></span>
                  </a>
                  <ul v-if="parentMenu.hasChildren" class="list-unstyled" v-show="parentMenu === activeParentMenu">
                    <li v-for="childMenu in parentMenu.children" :class="{'active': childMenu === activeChildMenu}">
                      <a :href="getHref(childMenu)" :target="getTarget(childMenu)" v-on:click="btnLeftMenuClick(childMenu)">
                        <i :class="childMenu.iconClass"></i> <span v-html="childMenu.text"></span> </a>
                    </li>
                  </ul>
                </li>
              </template>
              <li class="text-muted menu-title"></li>
              <li class="text-muted menu-title"></li>
            </ul>
            <div class="clearfix"></div>
          </div>
          <div class="clearfix"></div>
        </div>
      </div>
      <div class="content-page" id="content" :style="{marginLeft: (isDesktop ? 200 : 0) + 'px'}">
        <iframe id="frmMain" frameborder="0" id="right" name="right" :src="defaultPageUrl" :style="{width: (winWidth - (isDesktop ? 200 : 0)) + 'px', height: (winHeight - 62) + 'px'}"></iframe>
      </div>
    </template>
    <template v-else-if="pageAlert">
      <div class="alert m-3" v-bind:class="{ 'alert-warning': pageAlert.type === 'warning', 'alert-success': pageAlert.type === 'success', 'alert-danger': pageAlert.type === 'danger' }">
        <button v-on:click="pageAlert = null" class="close" data-dismiss="alert">×</button>
        <span v-html="pageAlert.html"></span>
      </div>
    </template>
    <template v-else>
      <div class="m-l-15 m-r-15">
        <div class="text-center" style="margin-top: 100px">
          <img class="mt-3" src="assets/images/loading.gif" />
          <p class="lead mt-3 text-nowrap">载入中，请稍后...</p>
        </div>
      </div>
    </template>
  </div>
</body>

</html>
<script src="assets/jquery/jquery-1.9.1.min.js" type="text/javascript"></script>
<script src="assets/js/layer/layer-3.1.1.js" type="text/javascript"></script>
<script src="inc/script.js" type="text/javascript"></script>
<script src="assets/js/es6-promise.auto.min.js" type="text/javascript"></script>
<script src="assets/js/axios-0.17.1.min.js" type="text/javascript"></script>
<script src="assets/js/vue-2.5.16.min.js" type="text/javascript"></script>
<script src="assets/js/apiUtils.js" type="text/javascript"></script>
<script src="assets/js/pageUtils.js" type="text/javascript"></script>
<script src="assets/js/utils.js" type="text/javascript"></script>
<script src="assets/js/compareversion.js" type="text/javascript"></script>
<script type="text/javascript">
  var apiUrl = '@Sys.InnerApiUrl';
</script>
<script src="main.js" type="text/javascript"></script>
